<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.io.*,java.sql.*,java.util.*,java.net.*,java.text.*"%>
<%@ page import="com.yuxin.common.util.*" %>
<%@ page import="com.yuxin.core.exception.SiteRuntimeException" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	Connection conn = DBUtil.getConnection();
    try{
        String sql = "SELECT ID,TITLE,IMG FROM P_NOTE WHERE TYPE = '1' AND TARGET = '1' ORDER BY UPDATE_TIME DESC ";
        List dataList = DBUtil.queryList(conn,sql);
        request.setAttribute("dataList",dataList);

        String goodsSql = "SELECT ID,TITLE,IMG,DESCRIPTION FROM P_NOTE WHERE TYPE = '2' AND TARGET = '1' ORDER BY UPDATE_TIME DESC ";
        List goodsList = DBUtil.queryList(conn,goodsSql);
        request.setAttribute("goodsList",goodsList);
        
    }catch (Exception e){
        throw new SiteRuntimeException(e);
    }finally {
    	DBUtil.close(conn);
    }
%>
<html>
<head>
    <meta charset="utf-8" />
    <title>中信信用卡平台</title>
    <meta name="Keywords" content="中信信用卡平台" />
    <meta name="Description" content="中信信用卡平台"/>
    <meta name="robots" content="all"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta http-equiv="cleartype" content="on"/>
    <link rel="icon" type="image/png" href="images/favicon.ico">
    <%@ include file="/site/css.jsp" %>
    <style type="text/css">
    	.column-list li img{height:80px;}
    	.column-list li .name{font-size:11pt;text-overflow:ellipsis;-o-text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}
    	.column-list li .price{font-size:10pt;overflow:hidden;display:block;color:#EA8511;padding-top:2px;font-size: 12pt;font-weight:600;}
    </style>
</head>
<body>
<div id="page">
    <div class="bg-D8000D-d8000d" id="header">
	    <span class="title left" style="line-height:40px;text-align:center;vertical-align: middle;">
	    	<img class="left" alt="" src="${ctx}/site/images/zx_logo.png" style="width:60%;height:70%;margin-top:5px;">
	    </span>
	</div>
   	<div id="image" class="swipe">
        <div class="swipe-wrap">
            <c:forEach items="${dataList}" var="data" varStatus="status">
                <div>
                    <a href="${ctx}/site/kuaixun_x.jsp?id=${data.ID}">
                    	<img src="${ctx}${data.IMG}" align="absmiddle"/>
                    </a>
                    <span class="bottom">${data.TITLE}</span>
                </div>
            </c:forEach>
        </div>
    </div>
    <div id="news" style="padding:0 8px;">
        <div class="news-title bg-D8000D-d8000d">
        	<div class="clearfix more bg-D8000D-d8000d">
	            <span style="margin-left:10px;" class="left">推荐商品</span>
        	</div>
        </div>
    </div>
    <div style="margin:0 auto;width:100%;max-width:800px;">
	    <ul class="column-list column-list-col3">
            <c:forEach items="${goodsList}" var="goods" varStatus="status">
	     		<li>
	     			<a class="cont" href="${goods.DESCRIPTION}">
	                     <img src="${ctx}/${goods.IMG}" align="absmiddle"/>
	                     <div class="text">${goods.TITLE}</div>
	                 </a>
	    		</li>
            </c:forEach>
		</ul>
	</div>
    <div id="container">
	<ul class="part4" id="part">
		<li>
			<a class="bg-EE5871" href="${ctx}/site/shangpin_lb.jsp?pClass=1&name=%25E4%25B8%25AD%25E9%25A4%2590">
                <img src="${ctx}/site/images/lanmu/zhongcan.png" align='absmiddle'/>
				<span class="sec-name">中餐</span>
			</a>
		</li>
		<li>
			<a class="bg-EE5871" href="${ctx}/site/shangpin_lb.jsp?pClass=2&name=%25E8%25A5%25BF%25E9%25A4%2590">
                <img src="${ctx}/site/images/lanmu/xican.png" align='absmiddle'/>
				<span class="sec-name">西餐</span>
			</a>
		</li>
		<li>
			<a class="bg-EE5871" href="${ctx}/site/shangpin_lb.jsp?pClass=3&name=%25E8%259B%258B%25E7%25B3%2595%25E7%2594%259C%25E5%2593%2581">
                <img src="${ctx}/site/images/lanmu/tiandian.png" align='absmiddle'/>
				<span class="sec-name">蛋糕甜品</span>
			</a>
		</li>
		<li>
			<a class="bg-EE5871" href="${ctx}/site/shangpin_lb.jsp?pClass=4&name=%25E8%2587%25AA%25E5%258A%25A9%25E9%25A4%2590">
                <img src="${ctx}/site/images/lanmu/zizhucan.png" align='absmiddle'/>
				<span class="sec-name">自助餐</span>
			</a>
		</li>
		<li>
			<a class="bg-EE5871" href="${ctx}/site/shangpin_lb.jsp?pClass=5&name=%25E7%2581%25AB%25E9%2594%2585">
                <img src="${ctx}/site/images/lanmu/huoguo.png" align='absmiddle'/>
				<span class="sec-name">火锅</span>
			</a>
		</li>
		<li>
			<a class="bg-00BEC8" href="${ctx}/site/shangpin_lb.jsp?pClass=6&name=%25E9%2585%2592%25E5%25BA%2597">
                <img src="${ctx}/site/images/lanmu/jiudian.png" align='absmiddle'/>
				<span class="sec-name">酒店</span>
			</a>
		</li>
		<li>
			<a class="bg-00BEC8" href="${ctx}/site/shangpin_lb.jsp?pClass=7&name=%25E6%2597%2585%25E6%25B8%25B8">
                <img src="${ctx}/site/images/lanmu/liuyou.png" align='absmiddle'/>
				<span class="sec-name">旅游</span>
			</a>
		</li>
		<li>
			<a class="bg-00BEC8" href="${ctx}/site/shangpin_lb.jsp?pClass=8&name=%25E7%2594%25B5%25E5%25BD%25B1%25E7%25A5%25A8">
                <img src="${ctx}/site/images/lanmu/dianying.png" align='absmiddle'/>
				<span class="sec-name">电影票</span>
			</a>
		</li>
		<li>
			<a class="bg-F48221" href="${ctx}/site/shangpin_lb.jsp?pClass=9&name=%25E6%2595%2599%25E8%2582%25B2%25E5%259F%25B9%25E8%25AE%25AD">
                <img src="${ctx}/site/images/lanmu/jiaoyu.png" align='absmiddle'/>
				<span class="sec-name">教育培训</span>
			</a>
		</li>
		<li>
			<a class="bg-F48221" href="${ctx}/site/shangpin_lb.jsp?pClass=10&name=%25E4%25BD%2593%25E6%25A3%2580%25E4%25BF%259D%25E5%2581%25A5">
                <img src="${ctx}/site/images/lanmu/tijian.png" align='absmiddle'/>
				<span class="sec-name">体检保健</span>
			</a>
		</li>
		<li>
			<a class="bg-F48221" href="${ctx}/site/shangpin_lb.jsp?pClass=11&name=%25E7%25BE%258E%25E5%25AE%25B9SPA">
                <img src="${ctx}/site/images/icon/fz.png.b.png" align='absmiddle'/>
				<span class="sec-name">美容SPA</span>
			</a>
		</li>
		<li>
			<a class="bg-F48221" href="${ctx}/site/shangpin_lb.jsp?pClass=12&name=%25E7%25BE%258E%25E5%258F%2591">
                <img src="${ctx}/site/images/lanmu/meifa.png" align='absmiddle'/>
				<span class="sec-name">美发</span>
			</a>
		</li>
	</ul>
	</div>
    <%@ include file="/site/footer.jsp" %>
</div>
<%@ include file="/site/js.jsp" %>
<script src="${ctx}/site/js/jquery.form.js"></script>
<script>
    $(document).ready(function(){
        $("#image").Swipe();
    });
</script>
</body>
</html>